<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>风景宜人管理后台</title>
    <meta name="keywords" content="微信">
    <meta name="description" content="风景宜人管理后台">
    {!!Html::style('/adminv/css/bootstrap.min.css')!!}
    <link href="/adminv/font-awesome/css/font-awesome.css" rel="stylesheet">

    <!-- Morris -->
    <link href="/adminv/css/plugins/morris/morris-0.4.3.min.css" rel="stylesheet">

    <!-- Gritter -->
    <link href="/adminv/js/plugins/gritter/jquery.gritter.css" rel="stylesheet">

    <link href="/adminv/css/animate.css" rel="stylesheet">
    <link href="/adminv/css/style.css" rel="stylesheet">
    <link href="/layer/skin/layer.css" rel="stylesheet">
    <link href="/layer/skin/layer.ext.css" rel="stylesheet">

    <!--simditor编辑器-->
    <link rel="stylesheet" type="text/css" href="/simditor/styles/simditor.css" />
    <link rel="stylesheet" href="/simditor/styles/simditor-emoji.css"/>


    <style>

    </style>
</head>

<body>
<div id="wrapper">


    <div class="row">

        <div class="col-lg-12">
            <div class="wrapper wrapper-content animated fadeInRight" id="pjax_load">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>图库列表
                                    <small></small>
                                </h5>

                            </div>
                            <div class="ibox-content">

                                <div>

                                    <textarea id="editor" autofocus></textarea>
                                    <span>注意：字数不要超过300字|换行:shift+回车，另起段落直接回车即可</span>

                                </div>


                                <div class="hr-line-dashed"></div>

                                <div class="form-group">
                                    <div class="col-md-4">
                                        <button class="btn btn-primary submitmenu comfirm" type="submit">确定</button>
                                        <button class="btn btn-white cancel" type="submit">取消</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

        </div>


    </div>


</div>
<!-- Mainly scripts -->
<script src="/adminv/js/jquery-2.1.1.min.js"></script>
<script src="/adminv/js/bootstrap.min.js"></script>
<script src="/adminv/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/adminv/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!---->
<!--<!-- Custom and plugin javascript -->
<script src="/adminv/js/hplus.js@v=2.2.0"></script>
<script src="/adminv/js/plugins/pace/pace.min.js"></script>
<script type="text/javascript" src="/adminv/js/jquery.pjax.js"></script>
<script src="/js/nestable/jquery.nestable.js"></script>
<script type="text/javascript" src="/webuploader/webuploader.js"></script>
<script type="text/javascript" src="/layer/layer.js"></script>
<script type="text/javascript" src="/layer/extend/layer.ext.js"></script>

<script type="text/javascript" src="/simditor/scripts/module.js"></script>
<script type="text/javascript" src="/simditor/scripts/hotkeys.js"></script>
<!--    <script type="text/javascript" src="/simditor/scripts/uploader.js"></script>-->
<script type="text/javascript" src="/simditor/scripts/simditor.js"></script>
<script type="text/javascript" src="/simditor/scripts/simditor-emoji.js"></script>
<script>
    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引


    var editor = new Simditor({
        textarea: $('#editor'),
        //toolbar: ['emoji'],
        toolbar: [],
        emoji: {
            imagePath: '/simditor/images/emoji/'
        }

            //optional options
    });

    // 点击取消
    $('.cancel').on('click', function () {
        parent.layer.close(index);

    });

    // 点击确定
    $('.comfirm').on('click', function() {

        $content = editor.getValue();
        console.log($content);
        if($content.length == 0) {
            parent.layer.msg('必须写点东西哦', {shade: 0.3})
        }else {
            // 隐藏图片
            parent.$('.uploadpic').hide();
            // 隐藏图文
            parent.$('.news').hide();
            // 显示文本并填充内容
            parent.$('.replywenben').show();
            parent.$('.replywenben').html($content);
            // 类型为text
            parent.$('.type').val('text');

            // 关闭窗口
            parent.layer.close(index);
        }

    });
</script>
</body>

</html>
